//
//  JwyBottomView.swift
//  GZWeibo007
//
//  Created by Mac on 15/12/24.
//  Copyright © 2015年 Apple. All rights reserved.
//

import UIKit
import SVProgressHUD

//代理协议
protocol JwyBottomViewDelegate:NSObjectProtocol{
    
    func jumpTo(btn:UIButton)//代理方法
    
}

class JwyBottomView: CZStatusBottomView {
    
    
    weak var delegate: JwyBottomViewDelegate?//代理属性
    
    //重写父类status属性方法
    override var status: CZStatus?{
        
        didSet{
            
        }
    }
    
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(frame: CGRect) {
        
        //添加按钮点击事件，按钮标记
        super.init(frame: frame)
        forwardButton.tag=1
        commentButton.tag=2
        forwardButton.addTarget(self, action: "pushZhuanfaController:", forControlEvents: UIControlEvents.TouchUpInside)
        commentButton.addTarget(self, action: "pushZhuanfaController:", forControlEvents: UIControlEvents.TouchUpInside)
        zanButton.addTarget(self, action: "didClickZan", forControlEvents: UIControlEvents.TouchUpInside)
        
    }
    
//MARK:------点击事件方法
    //跳转评论界面
    func pushZhuanfaController(btn:UIButton){
        
        // print("跳过去评论")
        
        delegate?.jumpTo(btn)
        
        
    }
    
    //点赞
    func didClickZan(){
        // print("赞一个")
        
        SVProgressHUD.showInfoWithStatus("没有开发此接口")
        
        
    }
    
    
    
    
}
